package com.ruoyi.web.core.packet;


import java.time.LocalDateTime;
import java.util.Arrays;

/**
 * @Description: 数据包格式封装
 * @author: lhl
 * @date: 2021年08月10日 19:10
 */
public class InsideMessagePacket {
    /**
     * 数据包
     **/
    protected byte[] body;
    /**
     * 设备时间戳
     */
    private long deviceTimestamp;
    /**
     * 16进制字符用于输出
     */
    private String bodyHexStr;

    /**
     * ic卡号
     */
    private int cardNum;

    private LocalDateTime swipeCardDate;

    @Override
    public String toString() {
        return "InsideMessagePacket{" +
                "deviceTimestamp=" + deviceTimestamp +
                ", body=" + Arrays.toString(body) +
                ", bodyHexStr='" + bodyHexStr + '\'' +
                ", cardNum=" + cardNum +
                ", swipeCardDate=" + swipeCardDate +
                '}';
    }


    public byte[] getBody() {
        return body;
    }

    public void setBody(byte[] body) {
        this.body = body;
    }

    public long getDeviceTimestamp() {
        return deviceTimestamp;
    }

    public void setDeviceTimestamp(long deviceTimestamp) {
        this.deviceTimestamp = deviceTimestamp;
    }

    public String getBodyHexStr() {
        return bodyHexStr;
    }

    public void setBodyHexStr(String bodyHexStr) {
        this.bodyHexStr = bodyHexStr;
    }

    public int getCardNum() {
        return cardNum;
    }

    public void setCardNum(int cardNum) {
        this.cardNum = cardNum;
    }

    public LocalDateTime getSwipeCardDate() {
        return swipeCardDate;
    }

    public void setSwipeCardDate(LocalDateTime swipeCardDate) {
        this.swipeCardDate = swipeCardDate;
    }
}
